I'll start this off by saying that I don't think the issue has anything to do with the breakaway switch or junction box, It sounds to me like the rain is causing a short on your wiring and this is what is causing your brakes to go out; since you just had new leaf springs put on the 5th wheel trailer it's possible that something was damaged during the repair process.
I would first examine the ground wire connection on your trailer-just because that's an extremely common cause of shorts... view full answer...